import { findHeadCategory } from '@/api/home'

const category = {
  namespace: true,
  state: {
    list: []
  },
  mutations: {
    setList(state, payload) {
      state.list = payload
    }
  },
  actions: {
    async asyncSetList(context) {
      const res = await findHeadCategory()
      console.log(res)
      context.commit('setList', res.result)
    }
  },
  getters: {

  }
  // 第一个是当前模块类型 
  // 第二个是根模块类型
}
export default category